import indexVue from "../vues/index.vue"
import VueRouter from 'vue-router'
import Vue from "vue"
import productVue from "../vues/product.vue"
import loginVue from "../vues/login.vue"
import cityVue from "../vues/city.vue"
import soveloVue from "../vues/sovelo.vue"
import doctormessageVue from "../vues/doctormessage.vue"
import companyVue from "../vues/company.vue"
import drugVue from "../vues/drug.vue"
Vue.use(VueRouter)
const routes = [{
		path: '/index',
		component: indexVue,
		children: [{
				path: '', // 默认子路由（当访问/index时，自动跳转）
				redirect: '/city' // 重定向到主页
			},
			{
				path: '/product',
				component: productVue
			},
			{
				path: '/city',
				component: cityVue
			},
			{
				path: '/sovelo',
				component: soveloVue
			},
			{
				path: '/doctormessage',
				component: doctormessageVue
			},
			{
				path: '/company',
				component: companyVue
			},
			{
				path: '/drug',
				component: drugVue
			},
		]
	},
	{
		path: "/",
		component: loginVue
	}
]
const router = new VueRouter({
	routes,
	mode: 'history'
})
export default router;